import QtQuick
import QtQuick.Controls

Rectangle {
    width: parent.width
    height: 100
    color: "#f0f0f0"

    Menu {
        id: menu
        MenuItem { text: "复制" }
        MenuItem { text: "粘贴" }
        MenuSeparator { }
        MenuItem { text: "设置" }
        MenuItem { text: "帮助" }
    }

    Button {
        anchors.centerIn: parent
        text: "点击显示菜单"
        onClicked: menu.popup()
    }
} 